.Dd September 11, 2024
.Dt XKBCLI\-HOW\-TO\-TYPE 1
.Os
.
.Sh NAME
.Nm "xkbcli\-how\-to\-type"
.Nd query how to type a given Unicode code point or keysym
.
.Sh SYNOPSIS
.Nm
.Op options
.Ar character/code point/keysym
.
.Sh DESCRIPTION
.Nm
prints the key combinations (keycode + modifiers) in the keymap’s layouts which
would produce the given Unicode code point or keysym.
.
.Pp
.Ar code point/keysym
is either:
.
.Bl -bullet -compact
.It
a single character (requires a terminal which uses UTF-8 character encoding);
.It
a Unicode code point, interpreted as hexadecimal if prefixed with
.Li 0x
or
.Li U+
else as decimal;
.
.It
a keysym if either the previous interpretations failed or if
.Fl \-keysym
is used. The parameter is then either a keysym \fIname\fP or a \fInumeric\fP value
(hexadecimal if prefixed with
.Li 0x
else decimal). Note that values
.Li 0
–
.Li 9
are special: they are both names and
numeric values. The default interpretation is \fInames\fP; use the hexadecimal
form
.Li 0x0
–
.Li 0x9
in order to interpret as numeric values.
.El
.
.Sh EXAMPLES
.Bl -tag -width Ds
.It Nm Fl \-layout Ar us 97
.It Nm Fl \-layout Ar us 0x61
.It Nm Fl \-layout Ar us U+0061
.It Nm Fl \-layout Ar us a
Print the key combinations that produce the letter “a”
.Po
decimal code point:
.Ar 97 ,
hexadecimal code point:
.Ar 61
.Pc
in the default
.Ar us
layout.
.It Nm Fl \-layout Ar us Fl \-keysym Ar 97
.It Nm Fl \-layout Ar us Fl \-keysym Ar 0x61
.It Nm Fl \-layout Ar us Fl \-keysym Ar a
Print the key combinations that produce the keysym “a”
.Po
decimal code:
.Ar 97 ,
hexadecimal code:
.Ar 61
.Pc
in the default
.Ar us
layout.
.El
.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl \-keysym
Treat the argument as only as a keysym
.
.It Fl \-disable\-compose
Disable Compose support
.
.It Fl \-format Ar keymap_format
Specify the keymap format (numeric or label, e.g.\&
.Dq v1 )
.
.It Fl \-keymap Oo = Ar PATH Oc
Load the XKB keymap from a file, ignore RMLVO options. If
.Ar PATH
is empty or
.Dq \- ,
read the stdin.
.
.It Fl \-rules Ar rules
The XKB ruleset
.
.It Fl \-model Ar model
The XKB model
.
.It Fl \-layout Ar layout
The XKB layout
.
.It Fl \-variant Ar variant
The XKB layout variant
.
.It Fl \-options Ar options
The XKB options
.
.It Fl \-enable\-environment\-names
Allow to set the default RMLVO values via the following environment variables:
.Bl -dash -compact -hang
.It
.Ev XKB_DEFAULT_RULES
.It
.Ev XKB_DEFAULT_MODEL
.It
.Ev XKB_DEFAULT_LAYOUT
.It
.Ev XKB_DEFAULT_VARIANT
.It
.Ev XKB_DEFAULT_OPTIONS
.El
Note that this option may affect the default values of the previous options.
.
.It Fl \-verbose
Enable verbose debugging output
.
.It Fl \-help
Print a help message and exit.
.El
.
.Sh SEE ALSO
.Xr xkbcli 1 ,
.Lk https://xkbcommon.org "The libxkbcommon online documentation"
